/**
 * Created by wangjunlei on 2018/2/10.
 */
function login(){
    var saveDataAry=[];
    var data1={username:$("#loginname").val(),password:$("#password").val()};
    saveDataAry.push(data1);
    $.ajax({
        type: "POST",
        url: projectPath+"/login/ajaxLogin",
        contentType: "application/json; charset=utf-8",
        data: JSON.stringify(data1),
        dataType: "json",
        success: function(result){
            if(result.code == "0"){//登录成功
                window.location.href = projectPath+'/index.html';
            }else{
                alert(result.data.msg);
            }
        }
    });
}